import Vue from 'vue'
import Router from 'vue-router'
import login from '../page/login/Login'
import index from '../page/index'
import vipVideo from '../page/index/modal/vipVideo'
import plManage from '../page/index/datagrid/plManage'
import register from '../page/register'
import datagrid from '../page/index/datagrid/datagrid'
import nopage from '../page/error/err404'

Vue.use(Router);

export default new Router({
  mode: 'history',
  // base: __dirname,
  routes: [
    {path: '/', redirect: '/login' },
    {path: '/login',name:'login', component: login},
    {path: '/register',name:'register', component: register},
    {path: '/index',name:'index', component: index,redirect:'/index/vipVideo',
      children:[
        {path: 'vipVideo',name:'vipVideo', component: vipVideo},
        {path:'datagrid',component:datagrid},
        {path: 'plManage', component: plManage}
      ]
    },
    {path:'*',component:nopage}
  ]
})
